/***
 * @Name: Router
 * @Author: Administrator
 * @Owner:
 * @Date: 2024-08-22 10:53
 * @LastEditTime: 2024-08-22 10:53
 * @LastEditors: Administrator
 * @Description:
 * @FilePath: E:/wwwroot/yarward-vite-demo/src/api/Mock\Router.js
 */

// 用户退出登录
export const getAuthMenuListInfo = () => {
  return new Promise((resolve) => {
    resolve({
      code: 200,
      data: [
        {
          path: '/index',
          component: '/home/index',
          name: 'Index',
          meta: { title: '首页', icon: 'HomeFilled', isAffix: true }
        },
        {
          path: '/auth',
          name: 'auth',
          redirect: '/auth/menu',
          meta: {
            icon: 'Lock',
            title: '权限管理',
            isLink: '',
            isHide: false,
            isFull: false,
            isAffix: false,
            isKeepAlive: true
          },
          children: [
            {
              path: '/auth/menu',
              name: 'authMenu',
              component: '/auth/menu',
              meta: {
                icon: 'Menu',
                title: '菜单权限',
                isLink: '',
                isHide: false,
                isFull: false,
                isAffix: false,
                isKeepAlive: true
              }
            },
            {
              path: '/auth/button',
              name: 'authButton',
              component: '/auth/button',
              meta: {
                icon: 'Menu',
                title: '按钮权限',
                isLink: '',
                isHide: false,
                isFull: false,
                isAffix: false,
                isKeepAlive: true
              }
            }
          ]
        },
        {
          path: '/menu',
          name: 'menu',
          redirect: '/menu/menu1',
          meta: {
            icon: 'List',
            title: '菜单嵌套',
            isLink: '',
            isHide: false,
            isFull: false,
            isAffix: false,
            isKeepAlive: true
          },
          children: [
            {
              path: '/menu/menu1',
              name: 'menu1',
              component: '/menu/menu1/index',
              meta: {
                icon: 'Menu',
                title: '菜单1',
                isLink: '',
                isHide: false,
                isFull: false,
                isAffix: false,
                isKeepAlive: true
              }
            },
            {
              path: '/menu/menu2',
              name: 'menu2',
              redirect: '/menu/menu2/menu21',
              meta: {
                icon: 'Menu',
                title: '菜单2',
                isLink: '',
                isHide: false,
                isFull: false,
                isAffix: false,
                isKeepAlive: true
              },
              children: [
                {
                  path: '/menu/menu2/menu21',
                  name: 'menu21',
                  component: '/menu/menu2/index',
                  meta: {
                    icon: 'Menu',
                    title: '菜单2-1',
                    isLink: '',
                    isHide: false,
                    isFull: false,
                    isAffix: false,
                    isKeepAlive: true
                  }
                },
                {
                  path: '/menu/menu2/menu22',
                  name: 'menu22',
                  redirect: '/menu/menu2/menu22/menu221',
                  meta: {
                    icon: 'Menu',
                    title: '菜单2-2',
                    isLink: '',
                    isHide: false,
                    isFull: false,
                    isAffix: false,
                    isKeepAlive: true
                  },
                  children: [
                    {
                      path: '/menu/menu2/menu22/menu221',
                      name: 'menu221',
                      component: '/menu/menu2/index',
                      meta: {
                        icon: 'Menu',
                        title: '菜单2-2-1',
                        isLink: '',
                        isHide: false,
                        isFull: false,
                        isAffix: false,
                        isKeepAlive: true
                      }
                    },
                    {
                      path: '/menu/menu2/menu22/menu222',
                      name: 'menu222',
                      component: '/menu/menu2/index',
                      meta: {
                        icon: 'Menu',
                        title: '菜单2-2-2',
                        isLink: '',
                        isHide: false,
                        isFull: false,
                        isAffix: false,
                        isKeepAlive: true
                      }
                    }
                  ]
                },
                {
                  path: '/menu/menu2/menu23',
                  name: 'menu23',
                  component: '/menu/menu2/index',
                  meta: {
                    icon: 'Menu',
                    title: '菜单2-3',
                    isLink: '',
                    isHide: false,
                    isFull: false,
                    isAffix: false,
                    isKeepAlive: true
                  }
                }
              ]
            },
            {
              path: '/menu/menu3',
              name: 'menu3',
              component: '/menu/menu3/index',
              meta: {
                icon: 'Menu',
                title: '菜单3',
                isLink: '',
                isHide: false,
                isFull: false,
                isAffix: false,
                isKeepAlive: true
              }
            }
          ]
        }
      ]
    });
  });
};

// 用户退出登录
export const getAuthButtonListInfo = () => {
  return new Promise((resolve) => {
    resolve({
      code: 200,
      data: ['system:config:add', 'system:config:edit', 'system:config:delete', 'system:config:export']
    });
  });
};
